package com.gusha.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name="sys_warehouse")
@NamedQuery(name="SysWarehouse.findAll", query="SELECT s FROM SysWarehouse s")
@DynamicInsert
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysWarehouse implements Serializable{
	 private static final long serialVersionUID = 1L;
	 
	 @Id
	 @GeneratedValue(strategy=GenerationType.IDENTITY)  
	 private BigInteger id;
	 
	 @ManyToOne(fetch=FetchType.LAZY)
	 @NotFound(action=NotFoundAction.IGNORE)
	 @JoinColumn(name="user_id")
	 private User user;//用户
	 
	 @Column(name="warehouse_no")
	 private BigInteger warehouseNo;//仓库编号
	 
	 @Column(name="vegetables_num")
	 private BigInteger vegetablesNum;//蔬菜数量
	 
	 @Column(name="steal_vegetables_num")
	 private BigInteger stealVegetablesNum;//偷来的蔬菜数量
	 
	 @Column(name="fruits_num")
	 private BigInteger fruitsNum;//水果数量
	 
	 @Column(name="steal_fruits_num")
	 private BigInteger stealFruitsNum;//偷来的水果数量
	 
	 @Column(name="poultry_num")
	 private BigInteger poultryNum;//家禽数量
	 
	 @Column(name="steal_poultry_num")
	 private BigInteger stealPoultryNum;//偷来的家禽数量
	 
	 @Column(name="flowers_num")
	 private BigInteger flowersNum;//花卉数量
	 
	 @Column(name="steal_flowers_num")
	 private BigInteger stealFlowersNum;//偷来的家禽数量
	 
	 @Column(name="aquatic_num")
	 private BigInteger aquaticNum;//水产数量
	 
	 @Column(name="steal_aquatic_num")
	 private BigInteger stealAquaticNum;//偷来的水产数量
	 
	 @Column(name="money")
	 private BigDecimal money;//余额

	 
	 
	public BigDecimal getMoney() {
		return money;
	}

	public void setMoney(BigDecimal money) {
		this.money = money;
	}

	public BigInteger getId() {
		return id;
	}

	public void setId(BigInteger id) {
		this.id = id;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public BigInteger getWarehouseNo() {
		return warehouseNo;
	}

	public void setWarehouseNo(BigInteger warehouseNo) {
		this.warehouseNo = warehouseNo;
	}

	public BigInteger getVegetablesNum() {
		return vegetablesNum;
	}

	public void setVegetablesNum(BigInteger vegetablesNum) {
		this.vegetablesNum = vegetablesNum;
	}

	public BigInteger getStealVegetablesNum() {
		return stealVegetablesNum;
	}

	public void setStealVegetablesNum(BigInteger stealVegetablesNum) {
		this.stealVegetablesNum = stealVegetablesNum;
	}

	public BigInteger getFruitsNum() {
		return fruitsNum;
	}

	public void setFruitsNum(BigInteger fruitsNum) {
		this.fruitsNum = fruitsNum;
	}

	public BigInteger getStealFruitsNum() {
		return stealFruitsNum;
	}

	public void setStealFruitsNum(BigInteger stealFruitsNum) {
		this.stealFruitsNum = stealFruitsNum;
	}

	public BigInteger getPoultryNum() {
		return poultryNum;
	}

	public void setPoultryNum(BigInteger poultryNum) {
		this.poultryNum = poultryNum;
	}

	public BigInteger getStealPoultryNum() {
		return stealPoultryNum;
	}

	public void setStealPoultryNum(BigInteger stealPoultryNum) {
		this.stealPoultryNum = stealPoultryNum;
	}

	public BigInteger getFlowersNum() {
		return flowersNum;
	}

	public void setFlowersNum(BigInteger flowersNum) {
		this.flowersNum = flowersNum;
	}

	public BigInteger getStealFlowersNum() {
		return stealFlowersNum;
	}

	public void setStealFlowersNum(BigInteger stealFlowersNum) {
		this.stealFlowersNum = stealFlowersNum;
	}

	public BigInteger getAquaticNum() {
		return aquaticNum;
	}

	public void setAquaticNum(BigInteger aquaticNum) {
		this.aquaticNum = aquaticNum;
	}

	public BigInteger getStealAquaticNum() {
		return stealAquaticNum;
	}

	public void setStealAquaticNum(BigInteger stealAquaticNum) {
		this.stealAquaticNum = stealAquaticNum;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	 
	 
	 
}
